import Vue from 'vue'
import App from './App.vue'
import '@vant/touch-emulator';
import router from './router'
import store from './store'
import '@/assets/js/flexible' 
import '@/assets/css/index.css' 
import '@/assets/css/border.css'
import '@/assets/css/cropper.css'
import '@/assets/css/reset.css'
import '@/assets/iconfont/iconfont.css'
import '@/assets/iconfont/iconfont.js'

import Api from './Api'
Vue.prototype.Api = Api
   
// import '@/assets/css/app.css'

import {
  Tabbar, TabbarItem, Tab, Tabs, Sku, Tag, Col, Icon,
  Cell, CellGroup, Swipe, SwipeItem, Search, Row, Checkbox, SubmitBar,
  AddressList, AddressEdit, Area, Button, Popup, Field, DatetimePicker, Picker,
  Rate, Uploader, Loading, NavBar,List,PullRefresh,Lazyload,PasswordInput,
  GoodsAction, GoodsActionIcon, GoodsActionButton,CouponCell, CouponList,
  Image as VanImage,
} from 'vant'

Vue.use(Tabbar).use(TabbarItem).use(Tab).use(Tabs).use(Sku)
  .use(Tag).use(Col).use(Icon).use(Cell).use(CellGroup)
  .use(Swipe).use(SwipeItem).use(GoodsAction).use(GoodsActionIcon).use(GoodsActionButton)
  .use(Search)
  .use(Row).use(Checkbox).use(SubmitBar)
  .use(AddressList).use(AddressEdit).use(Area).use(Button).use(Popup).use(PasswordInput).use(CouponCell).use(CouponList)
  .use(Field).use(DatetimePicker).use(Picker).use(Rate).use(Uploader).use(List).use(PullRefresh)
  .use(Loading).use(NavBar).use(VanImage);

Vue.use(Lazyload, {
  preLoad: 1.3,
  // error: 'dist/error.png',
  // loading: 'dist/loading.gif',
  attempt: 1
})

Vue.config.productionTip = true

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App),
})
